package model

import (
	"time"
)

type User struct {
	Id       int       `xorm:"id"`
	Username string    `xorm:"username"`
	Password string    `xorm:"password"`
	CreateAt time.Time `xorm:"create_at"`
}

func (u *User) Login() string {
	// has, _ := lib.Db(0).Get(u)
	has := false
	code := 0
	msg := "登录失败"
	if has {
		code = 1
		msg = "登录成功"
	}
	return string(code) + "" + msg + ""
	// return lib.JsonResponse(code, msg, "")
}
